#include "comm.hpp"

int main() {
    Init init;
    int fd = open(pathname.c_str(), O_RDONLY);
    
    while (true) {
        char buffer[1024] = {0};
        ssize_t n = read(fd, buffer, sizeof(buffer));
        if (n == 0) {
            cout << "read end" << endl;
            break;
        }
        buffer[n] = 0;
        cout << buffer << endl;
    }
    close(fd);
    return 0;
}